home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-02-22 | 54.7 KB | 1,801 lines |
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/gemlib/Changelog,v
- retrieving revision 1.20
- diff -c -r1.20 Changelog
- *** 1.20 1992/12/28 08:07:07
- --- Changelog 1993/02/22 06:07:35
- ***************
- *** 299,301 ****
- --- 299,346 ----
- gemfast.h:: ++jrb
- sync with mntlib 25
- ------------------------------- Patchlevel 26------------------------
- +
- + gemfast.h:: ++jrb
- + add new types for popup menus (falcon aes)
- + dont declare _addrin/_addrout for gcc, because they are # defines
- + in our case, not real arrays. (see common.h)
- +
- + aesmenu:: ++jrb
- + new bindings for popup/scroll menus (falcon aes)
- + menu_popup() menu_attach() menu_istart() menu_settings()
- +
- + aesbind.h:: ++jrb
- + add protos for new bindings.
- +
- + mincl:: ++jrb
- + add targets for new menu_*() fns
- +
- + vdibez.c:: ++jrb
- + bring stuff in sync with the bez docs in SpeedoGdos. no new
- + functions. just more info about the old ones, and some of the
- + bindings have contrl[2|4] set to specific values (and the
- + docs dont say why!).
- +
- + vdiinq.c:: ++jrb
- + updated the comment at the top about vqt_name() since its
- + official now in the SpeedoGDOS docs.
- +
- + vdifsm.c:: ++jrb
- + v_killoutline() doesnt exist any more
- + v_getoutline() is totally changed
- + vst_error() -- make it 16/32 bit clean.
- + vqt_advance32() -- new fn
- + vst_setsize32() -- new fn
- + vst_arbpt32() -- new fn
- + v_ftext_offset() -- new fn
- + vst_charmap() -- new fn
- + vst_kern() -- new fn
- + vqt_fontheader() -- new fn
- + vqt_trackkern() -- new fn
- + vqt_pairkern() -- new fn
- + v_getbitmap_info() -- totally new
- +
- + mincl, vdibind.h:: ++jrb
- + adjust for above changes.
- +
- + ------------------------------- Patchlevel 27 -------------------------------
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/gemlib/PatchLev.h,v
- retrieving revision 1.18
- diff -c -r1.18 PatchLev.h
- *** 1.18 1992/12/28 08:07:08
- --- PatchLev.h 1993/02/22 06:07:36
- ***************
- *** 1,4 ****
- ! #define PatchLevel "26"
-
- /*
- * the Patch Level above is to identify the version
- --- 1,4 ----
- ! #define PatchLevel "27"
-
- /*
- * the Patch Level above is to identify the version
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/gemlib/aesbind.h,v
- retrieving revision 1.11
- diff -c -r1.11 aesbind.h
- *** 1.11 1992/06/03 19:04:28
- --- aesbind.h 1993/02/22 06:07:39
- ***************
- *** 14,20 ****
- __EXTERN int appl_init __PROTO((void));
- __EXTERN int appl_read __PROTO((int ApId, int Length, void *ApPbuff));
- __EXTERN int appl_write __PROTO((int ApId, int Length, void *ApPbuff));
- ! __EXTERN int appl_find __PROTO((char *Name));
- __EXTERN int appl_tplay __PROTO((void *Mem, int Num, int Scale));
- __EXTERN int appl_trecord __PROTO((void *Mem, int Count));
- __EXTERN int appl_exit __PROTO((void));
- --- 14,20 ----
- __EXTERN int appl_init __PROTO((void));
- __EXTERN int appl_read __PROTO((int ApId, int Length, void *ApPbuff));
- __EXTERN int appl_write __PROTO((int ApId, int Length, void *ApPbuff));
- ! __EXTERN int appl_find __PROTO((const char *Name));
- __EXTERN int appl_tplay __PROTO((void *Mem, int Num, int Scale));
- __EXTERN int appl_trecord __PROTO((void *Mem, int Count));
- __EXTERN int appl_exit __PROTO((void));
- ***************
- *** 92,98 ****
- --- 92,106 ----
- __EXTERN int menu_tnormal __PROTO((void *Tree, int Item, int NormalFlag));
- __EXTERN int menu_text __PROTO((void *Tree, int Item, char *Text));
- __EXTERN int menu_register __PROTO((int ApId, char *MenuText));
- + __EXTERN int menu_popup __PROTO((MENU *me_menu, int me_xpos, int me_ypos,
- + MENU *me_mdata));
- + __EXTERN int menu_attach __PROTO((int me_flag, OBJECT *me_tree, int me_item,
- + MENU *me_mdata));
- + __EXTERN int menu_istart __PROTO((int me_flag, OBJECT *me_tree,
- + int me_imenu, int me_item));
- + __EXTERN int menu_settings __PROTO((int me_flag, MN_SET *me_values));
-
- +
- __EXTERN int objc_add __PROTO((void *Tree, int Parent, int Child));
- __EXTERN int objc_delete __PROTO((void *Tree, int Object));
- __EXTERN int objc_draw __PROTO((void *Tree, int Start, int Depth, int Cx,
- ***************
- *** 101,108 ****
- --- 109,121 ----
- int My));
- __EXTERN int objc_offset __PROTO((void *Tree, int Object, int *X, int *Y));
- __EXTERN int objc_order __PROTO((void *Tree, int Object, int NewPos));
- + #ifdef __TCC_GEMLIB__
- + __EXTERN int objc_edit __PROTO((void *Tree, int Object, int Char, int *Index,
- + int Kind));
- + #else
- __EXTERN int objc_edit __PROTO((void *Tree, int Object, int Char, int Index,
- int Kind, int *NewIndex));
- + #endif
- __EXTERN int objc_change __PROTO((void *Tree, int Object, int Res, int Cx,
- int Cy, int Cw, int Ch, int NewState,
- int Redraw));
- ***************
- *** 134,141 ****
- --- 147,158 ----
- int Wh));
- __EXTERN int wind_close __PROTO((int WindowHandle));
- __EXTERN int wind_delete __PROTO((int WindowHandle));
- + #ifdef __TCC_GEMLIB__
- + __EXTERN int wind_get __PROTO((int WindowHandle, int What, ...));
- + #else
- __EXTERN int wind_get __PROTO((int WindowHandle, int What,
- int *W1, int *W2, int *W3, int *W4));
- + #endif
- __EXTERN int wind_set __PROTO((int WindowHandle, int What, ...));
- __EXTERN int wind_find __PROTO((int X, int Y));
- __EXTERN int wind_update __PROTO((int Code));
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/gemlib/aesmenu.c,v
- retrieving revision 1.5
- diff -c -r1.5 aesmenu.c
- *** 1.5 1991/09/06 02:10:31
- --- aesmenu.c 1993/02/22 06:07:41
- ***************
- *** 7,12 ****
- --- 7,16 ----
- * menu_tnormal Display a menu item in normal/rev video
- * menu_text Change the text of a menu item
- * menu_register Put desk accessory menu item in Desk menu
- + * menu_popup Display a popup menu
- + * menu_attach Attach, change, remove or inq about a submenu
- + * menu_istart Set / inq about starting menu item of a submenu
- + * menu_settings Set / inq submenu delay/scroll values
- *
- * ++jrb bammi@cadence.com
- * modified: mj -- ntomczak@vm.ucs.ualberta.ca
- ***************
- *** 21,26 ****
- --- 25,34 ----
- #define L_menu_tno
- #define L_menu_tex
- #define L_menu_reg
- + #define L_menu_pop
- + #define L_menu_att
- + #define L_menu_ist
- + #define L_menu_set
-
- #endif /* __DEF_ALL__ */
-
- ***************
- *** 113,117 ****
- --- 121,208 ----
- return __aes__(AES_CONTROL_ENCODE(35, 1, 1, 1));
- }
- #endif /* L_menu_reg */
- +
- + #include <gemfast.h> /* for MENU, OBJECT etc */
- +
- + #ifdef L_menu_pop
- +
- + /* Allows an application to display a popup menu anywhere on the screen. The
- + * popup menu may also have submenus. If the number of menu items exceed the
- + * menu scroll height, the menu may also be set to scroll. menu_settings can
- + * be used to set the height at which all menus will start to scroll.
- + *
- + * returns 0 on failure, and data in me_data is invalid
- + * returns 1 on success, data in me_data is valid
- + */
- + int menu_popup(MENU *me_menu, int me_xpos, int me_ypos, MENU *me_mdata)
- + {
- + _int_in[0] = me_xpos;
- + _int_in[1] = me_ypos;
- +
- + _addrin[0] = me_menu;
- + _addrin[1] = me_mdata;
- +
- + return __aes__(AES_CONTROL_ENCODE(36, 2, 1, 2));
- + }
- + #endif /* L_menu_pop */
- +
- + #ifdef L_menu_att
- +
- + /* Allows an application to attach, change, remove or inquire about a submenu
- + * associated with a menu item.
- + *
- + * returns:0 failure: the submenu was not attached for whatever reasons
- + * 1 success: the submenu was attached, changed or removed successfully
- + */
- + int menu_attach(int me_flag, OBJECT *me_tree, int me_item, MENU *me_mdata)
- + {
- + _int_in[0] = me_flag;
- + _int_in[1] = me_item;
- +
- + _addrin[0] = me_tree;
- + _addrin[1] = me_mdata;
- + return __aes__(AES_CONTROL_ENCODE(37, 2, 1, 2));
- + }
- + #endif /* L_menu_att */
- +
- + #ifdef L_menu_ist
- +
- + /* Allows an application to set or inquire the starting menu item of a submenu
- + * that is associated with a menu item. The submenu is shifted vertically so
- + * that the starting menu item is aligned with the menu item that is associated
- + * with this submenu.
- + *
- + * returns: 0 failure: the submenu is not associated with a menu item. The
- + * submenu must be attached via menu_attach before this
- + * call can be made.
- + * >0 success: the starting menu item is currently set to this value.
- + */
- + int menu_istart(int me_flag, OBJECT *me_tree, int me_imenu, int me_item)
- + {
- + _int_in[0] = me_flag;
- + _int_in[1] = me_imenu;
- + _int_in[2] = me_item;
- +
- + _addrin[0] = me_tree;
- +
- + return __aes__(AES_CONTROL_ENCODE(38, 3, 1, 1));
- + }
- + #endif /* L_menu_ist */
- +
- + #ifdef L_menu_set
- +
- + /* Allows an application to set or inquire the submenu delay values and the
- + * menu scroll height value.
- + *
- + * returns 1 always
- + */
- + int menu_settings(int me_flag, MN_SET *me_values)
- + {
- + _int_in[0] = me_flag;
- +
- + _addrin[0] = me_values;
- + return __aes__(AES_CONTROL_ENCODE(39, 1, 1, 1));
- + }
- + #endif /* L_menu_set */
-
- /* - eof - */
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/gemlib/common.h,v
- retrieving revision 1.10
- diff -c -r1.10 common.h
- *** 1.10 1991/09/06 02:10:31
- --- common.h 1993/02/22 06:07:42
- ***************
- *** 5,12 ****
- *
- * modified: mj -- ntomczak@vm.ucs.ualberta.ca
- */
-
- -
- /* Array sizes in vdi control block */
-
- #define CNTRLMAX 12 /* It seems that 11 is enough - max reached
- --- 5,13 ----
- *
- * modified: mj -- ntomczak@vm.ucs.ualberta.ca
- */
- + #ifndef _COMMON_H
- + #define _COMMON_H
-
- /* Array sizes in vdi control block */
-
- #define CNTRLMAX 12 /* It seems that 11 is enough - max reached
- ***************
- *** 90,92 ****
- --- 91,95 ----
- /* vdi trap interface func */
- void __vdi__(unsigned long coded_contrl, int handle);
- void vdi(void);
- +
- + #endif /* _COMMON_H */
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/gemlib/gemfast.h,v
- retrieving revision 1.12
- diff -c -r1.12 gemfast.h
- *** 1.12 1992/12/28 08:07:11
- --- gemfast.h 1993/02/22 06:07:43
- ***************
- *** 1,6 ****
- --- 1,10 ----
- #ifndef _GEMFAST_H
- #define _GEMFAST_H
-
- + #ifndef _COMPILER_H
- + # include <compiler.h>
- + #endif
- +
- #ifdef __cplusplus
- extern "C" {
- #endif
- ***************
- *** 236,241 ****
- --- 240,246 ----
- #define TOUCHEXIT 0x0040
- #define HIDETREE 0x0080
- #define INDIRECT 0x0100
- + #define SUBMENU 0x0800 /* falcon aes hierarchical menus */
- /* Object states */
- #define NORMAL 0x0000
- #define SELECTED 0x0001
- ***************
- *** 284,292 ****
- --- 289,301 ----
-
- typedef struct
- {
- + #ifdef __TCC_COMPAT__
- + void *fd_addr;
- + #else /* !__TCC_COMPAT__ */
- long fd_addr; /* Addrerss of upper left corner of first*/
- /* plane of raster area. If NULL then */
- /* MFDB is for a physical device */
- + #endif /* !__TCC_COMPAT__ */
- short fd_w; /* Form Width in Pixels */
- short fd_h; /* Form Height in Pixels */
- short fd_wdwidth; /* Form Width in shorts(fd_w/sizeof(int)*/
- ***************
- *** 421,432 ****
-
- } BITBLK;
-
- - typedef struct user_block
- - {
- - int (*ub_code)(void *parmblock); /* really PARMBLK *parmblock */
- - long ub_parm;
- - } USERBLK;
- -
- #ifndef __TCC_COMPAT__
- typedef struct object
- {
- --- 430,435 ----
- ***************
- *** 445,459 ****
- #else
-
- typedef struct {
- ! unsigned short character : 8;
- ! signed short framesize : 8;
- ! unsigned short framecol : 4;
- ! unsigned short textcol : 4;
- ! unsigned short textmode : 1;
- ! unsigned short fillpattern : 3;
- ! unsigned short interiorcol : 4;
- } bfobspec;
-
- typedef union __u_ob_spec {
- TEDINFO *tedinfo;
- long index;
- --- 448,464 ----
- #else
-
- typedef struct {
- ! unsigned int character : 8;
- ! signed int framesize : 8;
- ! unsigned int framecol : 4;
- ! unsigned int textcol : 4;
- ! unsigned int textmode : 1;
- ! unsigned int fillpattern : 3;
- ! unsigned int interiorcol : 4;
- } bfobspec;
-
- + struct user_block; /* forward declaration */
- +
- typedef union __u_ob_spec {
- TEDINFO *tedinfo;
- long index;
- ***************
- *** 462,468 ****
- bfobspec obspec;
- BITBLK *bitblk;
- ICONBLK *iconblk;
- ! USERBLK *userblk;
- /* APPLBLK *applblk;
- char *string; */
- } U_OB_SPEC;
- --- 467,473 ----
- bfobspec obspec;
- BITBLK *bitblk;
- ICONBLK *iconblk;
- ! struct user_block *userblk;
- /* APPLBLK *applblk;
- char *string; */
- } U_OB_SPEC;
- ***************
- *** 494,499 ****
- --- 499,514 ----
- long pb_parm;
- } PARMBLK;
-
- + typedef struct user_block
- + {
- + #ifdef __TCC_COMPAT__
- + int __CDECL (*ub_code)(PARMBLK *parmblock);
- + #else
- + int __CDECL (*ub_code)(void *parmblock); /* really PARMBLK *parmblock */
- + #endif
- + long ub_parm;
- + } USERBLK;
- +
- /* used in RSCREATE.C */
- typedef struct rshdr
- {
- ***************
- *** 519,527 ****
- --- 534,586 ----
-
- #define DESKTOP_HANDLE 0
-
- + /* falcon aes menu_popup and menu_attach structure for passing and receiving
- + * submenu data.
- + */
- +
- + typedef struct _menu
- + {
- + OBJECT *mn_tree; /* the object tree of the menu */
- + short mn_menu; /* the parent object of the menu items */
- + short mn_item; /* the starting menu item */
- + short mn_scroll; /* the scroll field status of the menu
- + 0 - The menu will not scroll
- + !0 - The menu will scroll if the number of menu
- + items exceed the menu scroll height. The
- + non-zero value is the object at which
- + scrolling will begin. This will allow one
- + to have a menu in which the scrollable region
- + is only a part of the whole menu. The value
- + must be a menu item in the menu.
- +
- + menu_settings can be used to change the menu
- + scroll height.
- +
- + NOTE: If the scroll field status is !0, the menu
- + items must consist entirely of G_STRINGS. */
- + short mn_keystate; /* The CTRL, ALT, SHIFT Key state at the time the
- + mouse button was pressed. */
- + } MENU;
- +
- + /* menu_settings uses a new structure for setting and inquiring the submenu
- + * delay values and the menu scroll height. The delay values are measured in
- + * milliseconds and the height is based upon the number of menu items.
- + */
- +
- + typedef struct _mn_set
- + {
- + long Display; /* the submenu display delay */
- + long Drag; /* the submenu drag delay */
- + long Delay; /* the single-click scroll delay */
- + long Speed; /* the continuous scroll delay */
- + short Height; /* the menu scroll height */
- + } MN_SET;
- +
- /* (user visible) binding arrays */
- extern short _intin[], _intout[], _ptsin[], _ptsout[];
- + #ifndef __GNUC__ /* for gcc see common.h in gemlib */
- extern void *_addrin[], *_addrout[];
- + #endif
- extern int gl_apid, gl_ap_version;
-
- #ifdef __cplusplus
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/gemlib/mincl,v
- retrieving revision 1.8
- diff -c -r1.8 mincl
- *** 1.8 1992/04/19 16:47:42
- --- mincl 1993/02/22 06:07:45
- ***************
- *** 26,33 ****
- shel_put.o
-
- AESMENU = menu_bar.o menu_ich.o menu_ien.o menu_tno.o menu_tex.o \
- ! menu_reg.o
-
- AESOBJ = objc_add.o objc_del.o objc_dra.o objc_fin.o objc_off.o \
- objc_ord.o objc_edi.o objc_cha.o
-
- --- 26,34 ----
- shel_put.o
-
- AESMENU = menu_bar.o menu_ich.o menu_ien.o menu_tno.o menu_tex.o \
- ! menu_reg.o menu_pop.o menu_att.o menu_ist.o menu_set.o
-
- +
- AESOBJ = objc_add.o objc_del.o objc_dra.o objc_fin.o objc_off.o \
- objc_ord.o objc_edi.o objc_cha.o
-
- ***************
- *** 59,68 ****
- vsc_expo.o v_meta_e.o v_write_.o vm_pages.o vm_coord.o \
- vm_filen.o v_escape.o
-
- ! VDIFSM = vqt_fext.o v_ftext.o v_killou.o v_getout.o vst_scra.o vst_erro.o \
- ! v_shtext.o vst_arbp.o vqt_adva.o vqt_devi.o v_saveca.o \
- ! v_loadca.o v_flushc.o vst_sets.o vst_skew.o vqt_get_.o \
- ! vqt_cach.o v_getbit.o
-
- VDIGDP = v_bar.o v_arc.o v_piesli.o v_circle.o v_ellarc.o \
- v_ellpie.o v_ellips.o v_rbox.o v_rfbox.o v_justif.o
- --- 60,70 ----
- vsc_expo.o v_meta_e.o v_write_.o vm_pages.o vm_coord.o \
- vm_filen.o v_escape.o
-
- ! VDIFSM = vqt_fext.o v_ftext.o v_fteof.o v_getout.o vst_scra.o vst_erro.o \
- ! v_shtext.o vst_arbp.o vst_ar32.o vqt_adva.o vqt_ad32.o vqt_devi.o \
- ! v_saveca.o v_loadca.o v_flushc.o vst_sets.o vst_se32.o vst_skew.o \
- ! vqt_get_.o vqt_cach.o vst_char.o vst_kern.o vqt_fnt.o vqt_trac.o \
- ! vqt_pair.o v_getbit.o
-
- VDIGDP = v_bar.o v_arc.o v_piesli.o v_circle.o v_ellarc.o \
- v_ellpie.o v_ellips.o v_rbox.o v_rfbox.o v_justif.o
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/gemlib/vdibez.c,v
- retrieving revision 1.2
- diff -c -r1.2 vdibez.c
- *** 1.2 1992/04/19 16:47:42
- --- vdibez.c 1993/02/22 06:07:46
- ***************
- *** 10,15 ****
- --- 10,18 ----
- * set of symbols with compilers which need symbols unique in the
- * first seven characters. Besides this resolution is required
- * by "The Standard" :-)
- + *
- + * ++jrb sync up with SpeedoGDOS docs
- + *
- */
- #include "common.h"
- #ifndef _COMPILER_H
- ***************
- *** 39,47 ****
- * Inform GDOS about location and size of a buffer which GDOS
- * can use for creation of Bezier curves.
- * buf_p is a pointer to an address of a buffer
- ! * size its a buffer size in 2-byte words (!!)
- ! * or 16-bytes paragraphs - depends in which document
- ! * you believe.
- * If buf_p is NULL, then space for a buffer will be allocated
- * by GDOS - using Malloc (who knows where to look for this space?)
- *
- --- 42,49 ----
- * Inform GDOS about location and size of a buffer which GDOS
- * can use for creation of Bezier curves.
- * buf_p is a pointer to an address of a buffer
- ! * size its a buffer size in 16-bytes paragraphs
- ! *
- * If buf_p is NULL, then space for a buffer will be allocated
- * by GDOS - using Malloc (who knows where to look for this space?)
- *
- ***************
- *** 54,61 ****
-
- *wptr++ = (short) buf_p; /* low word of an address */
- *wptr++ = (short)((long)buf_p >> 16); /* high word of an address */
- ! *wptr = (short) size; /* size of buffer in something */
- !
- wptr = (short *)_contrl;
- *wptr++ = -1; /* 0 - opcode */
- *wptr++ = 0; /* 1 */
- --- 56,63 ----
-
- *wptr++ = (short) buf_p; /* low word of an address */
- *wptr++ = (short)((long)buf_p >> 16); /* high word of an address */
- ! *wptr = (short) size; /* size of buffer in paragraphs */
- ! /* para == 16 bytes */
- wptr = (short *)_contrl;
- *wptr++ = -1; /* 0 - opcode */
- *wptr++ = 0; /* 1 */
- ***************
- *** 93,100 ****
- /*
- * v_bez_on (alias v_bezon)
- * Enable Bezier capabilities.
- ! * Find a number of segments per Bezier curve.
- ! * Returns logarithm in a base of 2 from that number
- */
-
- __asm__(".stabs \"_v_bezon\",5,0,0,_v_bez_on"); /* dept of clean tricks */
- --- 95,105 ----
- /*
- * v_bez_on (alias v_bezon)
- * Enable Bezier capabilities.
- ! * Returns maximum Bezier depth (a measure of smoothness). The return
- ! * value can range from 0-7, and is the exponent of 2, giving the
- ! * number of line segments that make up the curve.
- ! * 0 == 2**0 == 1 == straight line and
- ! * 7 == 2**7 == 128 line segments.
- */
-
- __asm__(".stabs \"_v_bezon\",5,0,0,_v_bez_on"); /* dept of clean tricks */
- ***************
- *** 101,107 ****
- --- 106,114 ----
- int
- v_bez_on (int handle)
- {
- + _contrl[4] = 4; /* dont know why, but atari docs say so! */
- __vdi__(VDI_CONTRL_ENCODE(11, 1, 0, 13), handle);
- + _contrl[4] = 0; /* clear it back */
- return *_intout;
- }
- #endif /* L_v_bez_on */
- ***************
- *** 112,117 ****
- --- 119,125 ----
- * v_bez_off (alias v_bezoff)
- * Disable Bezier capabilities.
- * Free space allocated by GDOS for Bezier curves.
- + * (see v_set_app_buff for memory alloc info)
- */
- __asm__(".stabs \"_v_bezoff\",5,0,0,_v_bez_off"); /* dept of clean tricks */
- void
- ***************
- *** 175,181 ****
- --- 183,197 ----
- while (optr < end)
- *optr++ = *xyarr++;
- #endif
- +
- + _contrl[2] = 2; /* dont know why, the atari docs say so without */
- + _contrl[4] = 6; /* any explaination */
- +
- __vdi__(VDI_CONTRL_ENCODE(cntrl0, count, ((count + 1) >> 1), 13), handle);
- +
- + _contrl[2] = 0;
- + _contrl[4] = 0;
- +
- #ifdef __MSHORT__
- /* restore standard parameter block */
- _vdiparams[2] = (void *) _ptsin;
- ***************
- *** 251,257 ****
- --- 267,280 ----
- while (optr < end)
- *optr++ = *xyarr++;
- #endif
- + _contrl[2] = 2; /* dont know why, the atari docs say so without */
- + _contrl[4] = 6; /* any explaination */
- +
- __vdi__(VDI_CONTRL_ENCODE(cntrl0, count, ((count + 1) >> 1), 13), handle);
- +
- + _contrl[2] = 0;
- + _contrl[4] = 0;
- +
- #ifdef __MSHORT__
- /* restore standard parameter block */
- _vdiparams[2] = (void *) _ptsin;
- ***************
- *** 296,306 ****
- *wptr++ = 0; /* 1 */
- wptr++; /* 2 */
- *wptr++ = 3; /* 3 - # of entries in _intin */
- ! wptr++; /* 4 */
- *wptr++ = 99; /* 5 - id */
- *wptr = handle; /* 6 - handle */
- vdi(); /* call vdi */
- !
- return (*actual = *_intout);
- }
- #endif /* L_v_bez_qu */
- --- 319,330 ----
- *wptr++ = 0; /* 1 */
- wptr++; /* 2 */
- *wptr++ = 3; /* 3 - # of entries in _intin */
- ! *wptr++ = 1; /* 4 - atari doesnt say why! */
- *wptr++ = 99; /* 5 - id */
- *wptr = handle; /* 6 - handle */
- vdi(); /* call vdi */
- ! _contrl[4] = 0; /* clear it back */
- !
- return (*actual = *_intout);
- }
- #endif /* L_v_bez_qu */
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/gemlib/vdibind.h,v
- retrieving revision 1.12
- diff -c -r1.12 vdibind.h
- *** 1.12 1992/06/03 19:04:28
- --- vdibind.h 1993/02/22 06:07:47
- ***************
- *** 285,305 ****
- __EXTERN unsigned long vq_gdos __PROTO((void));
- #endif /* __GNUC__ | !__NO_INLINE__ */
-
- ! /* FSM gdos bindings */
-
- ! /* ---------------------------------------------------------------------------
- ! * Retrieve placement information for FSM generated characters
- ! * Information is placed in infoarray of 52 ints.
- ! * Borrow a soothsayer from DRI or Atari to find its meaning.
- ! *
- ! * This is a temporary bindings since one genius decided
- ! * that some entries in infoarray will represent real numbers.
- ! * You may fully expect that that this representation of reals is
- ! * absolutely different from what your compiler is using.
- ! * Count your lucky stars if at least sizeof(double) == 2 * sizeof(int).
- ! * Or maybe sizeof(double) is supposed to be sizeof(float)?
- ! */
- ! __EXTERN void v_getbitmap_info __PROTO((int handle, int ch, int infoarray[]));
-
- /*
- * Inquire text extent, accounting for FSM text placement
- --- 285,306 ----
- __EXTERN unsigned long vq_gdos __PROTO((void));
- #endif /* __GNUC__ | !__NO_INLINE__ */
-
- ! /* FSM/SpeedGDOS bindings */
-
- ! /* Get Character Bitmap Information. This call provides information to allow
- ! * the caller to know the exact size and placement of a given character. This
- ! * information includes the character's x and y advance vectors, the x and y
- ! * offsets, and the bitmap dimensions of the character. The advance vector
- ! * represents the amount to add to the current point to place the following
- ! * character. The x and y offsets, when added to the current point, give the
- ! * caller the location of the upper left hand corner of the bitmap. The width
- ! * and height of the bitmap are returned as 16 bit integers. All other values
- ! * are returned in fix31 representation.
- ! */
- ! __EXTERN void v_getbitmap_info __PROTO((int handle, int ch, long *advancex,
- ! long *advancey, long *xoffset, long *yoffset, int *width, int *height,
- ! short **bitmap));
- !
-
- /*
- * Inquire text extent, accounting for FSM text placement
- ***************
- *** 307,325 ****
- __EXTERN void vqt_f_extent __PROTO((int handle, const char *str, int extent[]));
-
- /*
- ! * Draw FSM text (accounts for fractional advances in rotated text)
- */
- __EXTERN void v_ftext __PROTO((int handle, int x, int y, const char *str));
- !
- ! /*
- ! * Release memory associated with outline component generated by v_getoutline()
- ! */
- ! __EXTERN void v_killoutline __PROTO((int handle, void *component));
-
- /*
- * Generate an outline for character ch, and return the address of the outline.
- */
- ! __EXTERN void v_getoutline __PROTO((int handle, int ch, void **component));
-
- /*
- * Set scratch buffer allocation mode.
- --- 308,324 ----
- __EXTERN void vqt_f_extent __PROTO((int handle, const char *str, int extent[]));
-
- /*
- ! * Draw outline font text (accounts for fractional advances in rotated text)
- */
- __EXTERN void v_ftext __PROTO((int handle, int x, int y, const char *str));
- ! __EXTERN void v_ftext_offset __PROTO((int handle, int x, int y,
- ! const char *str, int *offset));
-
- /*
- * Generate an outline for character ch, and return the address of the outline.
- */
- ! __EXTERN void v_getoutline __PROTO((int handle, int ch, int *xyarray,
- ! char *bezarray, int maxverts, int *numverts));
-
- /*
- * Set scratch buffer allocation mode.
- ***************
- *** 347,358 ****
- */
- __EXTERN int vst_arbpt __PROTO(( int handle, int point, int *wchar,
- int *hchar, int *wcell, int *hcell ));
-
- /*
- ! * Inquire FSM text advance placement vector.
- */
- __EXTERN void vqt_advance __PROTO(( int handle, int ch, int *xadv,
- int *yadv, int *xrem, int *yrem));
-
- /*
- * Inquire device status information.
- --- 346,361 ----
- */
- __EXTERN int vst_arbpt __PROTO(( int handle, int point, int *wchar,
- int *hchar, int *wcell, int *hcell ));
- + __EXTERN long vst_arbpt32 __PROTO(( int handle, long point, int *wchar,
- + int *hchar, int *wcell, int *hcell ));
-
- /*
- ! * Inquire outline font text advance placement vector.
- */
- __EXTERN void vqt_advance __PROTO(( int handle, int ch, int *xadv,
- int *yadv, int *xrem, int *yrem));
- + __EXTERN void vqt_advance32 __PROTO((int handle, int ch, long *advx,
- + long *advy));
-
- /*
- * Inquire device status information.
- ***************
- *** 380,385 ****
- --- 383,390 ----
- */
- __EXTERN int vst_setsize __PROTO(( int handle, int point, int *wchar,
- int *hchar, int *wcell, int *hcell ));
- + __EXTERN long vst_setsize32 __PROTO(( int handle, long point, int *wchar,
- + int *hchar, int *wcell, int *hcell ));
-
- /*
- * Set FSM skew.
- ***************
- *** 389,402 ****
- /*
- * Get FSM GASCII tables.
- */
- __EXTERN void vqt_get_tables __PROTO(( int handle, void **gascii,
- void **style ));
-
- /*
- ! * Get FSM cashe size
- */
- __EXTERN void vqt_cachesize __PROTO(( int handle, int which_cache,
- size_t *size ));
-
- /*
- * bezier curves stuff
- --- 394,437 ----
- /*
- * Get FSM GASCII tables.
- */
- + __EXTERN void vqt_get_table __PROTO((int handle, short **map));
- + #if 0 /* old FSMgdos binding */
- __EXTERN void vqt_get_tables __PROTO(( int handle, void **gascii,
- void **style ));
- + #endif
-
- /*
- ! * Get FSM cache size
- */
- __EXTERN void vqt_cachesize __PROTO(( int handle, int which_cache,
- size_t *size ));
- + /*
- + * Set Character Mapping Mode
- + */
- + __EXTERN void vst_charmap __PROTO((int handle, int mode));
- +
- + /*
- + * Set Kerning Mode
- + */
- + __EXTERN void vst_kern __PROTO((int handle, int tmode, int pmode, int *tracks,
- + int *pairs));
- +
- + /*
- + * Inq Speedo Header
- + */
- + __EXTERN void vqt_fontheader __PROTO((int handle, char *buffer, char
- + *pathname));
- +
- + /*
- + * Inq track kerning info
- + */
- + __EXTERN void vqt_trackkern __PROTO((int handle, long *x, long *y));
- +
- + /*
- + * Inq pair kerning info
- + */
- + __EXTERN void vqt_pairkern __PROTO((int handle, int ch1, int ch2, long *x, long
- + *y));
-
- /*
- * bezier curves stuff
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/gemlib/vdifsm.c,v
- retrieving revision 1.5
- diff -c -r1.5 vdifsm.c
- *** 1.5 1992/01/14 19:33:03
- --- vdifsm.c 1993/02/22 06:07:49
- ***************
- *** 1,8 ****
- /*
- ! * FSM gdos bindings
- * this file has some relationship to a file supplied by Atari
- * but it changed quite a bit (among other things it appears to work).
- * v_shtext survived verbatim from the original.
- */
-
- #include "common.h"
- --- 1,13 ----
- /*
- ! * FSM/SpeedoGDOS gdos bindings
- * this file has some relationship to a file supplied by Atari
- * but it changed quite a bit (among other things it appears to work).
- * v_shtext survived verbatim from the original.
- + *
- + * ++jrb add more speedoGDOS stuff. now it looks nothing like the one
- + * from atari. i guess this file should now be called vdispeedo or
- + * something like that. btw: atari claims that the api did'nt change
- + * yeah right!
- */
-
- #include "common.h"
- ***************
- *** 11,105 ****
- #endif
- #include <types.h>
-
- - /* FSMBIND functions
- - * ======================================================================
- - */
- -
- #ifdef __DEF_ALL__
-
- - #define L_v_getbit
- #define L_vqt_fext
- #define L_v_ftext
- ! #define L_v_killou
- #define L_v_getout
- #define L_vst_scra
- #define L_vst_erro
- #define L_v_shtext
- #define L_vst_arbp
- #define L_vqt_adva
- #define L_vqt_devi
- #define L_v_saveca
- #define L_v_loadca
- #define L_v_flushc
- #define L_vst_sets
- #define L_vst_skew
- #define L_vqt_get_
- #define L_vqt_cach
-
- #endif /* __DEF_ALL__ */
-
- - #ifdef L_v_getbit
- -
- - /* ---------------------------------------------------------------------------
- - * Retrieve placement information for FSM generated characters
- - * Information is placed in infoarray of 52 ints.
- - * Borrow a soothsayer from DRI or Atari to find its meaning.
- - *
- - * This is a temporary bindings since one genius decided
- - * that some entries in infoarray will represent real numbers.
- - * You may fully expect that that this representation of reals is
- - * absolutely different from what your compiler is using.
- - * Count your lucky stars if at least sizeof(double) == 2 * sizeof(int).
- - * Or maybe sizeof(double) is supposed to be sizeof(float)?
- - */
- - void
- - v_getbitmap_info(int handle, int ch, int infoarray[52])
- - {
- - short *ptr = _intin;
- -
- - *ptr++ = ch;
- - *(int **)ptr = &infoarray[0];
- -
- - __vdi__(VDI_CONTRL_ENCODE(239, 0, 3, 0), handle);
- -
- - #ifndef __MSHORT__
- - /* Repack returned information from an array of shorts into an
- - array of ints */
- - { /* dummy block to contain new declarations */
- - short *s_ptr = (short *)(&infoarray[0]) + 52;
- - short *bot = (short *)(&infoarray[0]) + 4;
- - int *i_ptr = (&infoarray[0]) + 52;
- -
- - do {
- - s_ptr -= 2; /* copy y-offset */
- - *(--i_ptr) = *(int *)s_ptr;
- - *(--i_ptr) = 0;
- -
- - s_ptr -= 2; /* copy x-offset */
- - *(--i_ptr) = *(int *)s_ptr;
- - *(--i_ptr) = 0;
- -
- - *(--i_ptr) = *(--s_ptr); /* bitmap height */
- - *(--i_ptr) = *(--s_ptr); /* bitmap width */
- - } while (s_ptr > bot);
- -
- - *(--i_ptr) = *(--s_ptr); /* remainder y-advance */
- - *(--i_ptr) = *(--s_ptr); /* y-advance */
- - *(--i_ptr) = *(--s_ptr); /* remainder x-advance */
- - *i_ptr = *s_ptr; /* x-advance */
- - }
- - #endif /* __MSHORT__ */
- - }
- -
- - #endif /* L_v_getbit */
- -
- #ifdef L_vqt_fext
-
- ! /* ---------------------------------------------------------------------------
- ! * Inquire text extent, accounting for FSM text placement
- */
- ! void
- ! vqt_f_extent(int handle, const char *str, int extent[8])
- {
- unsigned char ch;
- short *ptr;
- --- 16,59 ----
- #endif
- #include <types.h>
-
- #ifdef __DEF_ALL__
-
- #define L_vqt_fext
- #define L_v_ftext
- ! #define L_v_fteof
- #define L_v_getout
- #define L_vst_scra
- #define L_vst_erro
- #define L_v_shtext
- #define L_vst_arbp
- + #define L_vst_ar32
- #define L_vqt_adva
- + #define L_vqt_ad32
- #define L_vqt_devi
- #define L_v_saveca
- #define L_v_loadca
- #define L_v_flushc
- #define L_vst_sets
- + #define L_vst_se32
- #define L_vst_skew
- #define L_vqt_get_
- #define L_vqt_cach
- + #define L_vst_char
- + #define L_vst_kern
- + #define L_vqt_fnt
- + #define L_vqt_trac
- + #define L_vqt_pair
- + #define L_v_getbit
-
- #endif /* __DEF_ALL__ */
-
- #ifdef L_vqt_fext
-
- ! /* Inquire Outline Font Text Extent. This function works exactly like
- ! * vqt_extent(), but the rectangle returned will account for the remainder
- ! * values of vqt_advance() and kerning.
- */
- ! void vqt_f_extent(int handle, const char *str, int extent[8])
- {
- unsigned char ch;
- short *ptr;
- ***************
- *** 124,131 ****
-
- #ifdef L_v_ftext
-
- ! /* ---------------------------------------------------------------------------
- ! * Draw FSM text (accounts for fractional advances in rotated text)
- */
- void
- v_ftext(int handle, int x, int y, const char *str)
- --- 78,92 ----
-
- #ifdef L_v_ftext
-
- ! /* Outline Font Text. This function works exactly like v_gtext(), but the text
- ! * returned will account for the remainder values of vqt_advance(). In other
- ! * words, the text spacing will be more accurate. In addition, for applications
- ! * that want more control over character placement, v_ftext() will take a
- ! * custom set of offset vectors, one for each character in the string
- ! * (including the last one for underlining calculations). Each vector must
- ! * consist of a pair of 16-bit values that will be used in place of a
- ! * character's advance vector when outputting text. A second binding follows
- ! * the original.
- */
- void
- v_ftext(int handle, int x, int y, const char *str)
- ***************
- *** 144,173 ****
-
- #endif /* L_v_ftext */
-
- !
- ! #ifdef L_v_killou
- ! /* ---------------------------------------------------------------------------
- ! * Release memory associated with outline component generated by v_getoutline()
- ! */
- ! void
- ! v_killoutline(int handle, void *component)
- {
- ! *(void **)&_intin[0] = component;
- ! __vdi__(VDI_CONTRL_ENCODE(242, 0, 2, 0), handle);
- }
- #endif /* L_v_killou */
-
-
- #ifdef L_v_getout
- ! /* ---------------------------------------------------------------------------
- ! * Generate an outline for character ch, and return the address of the outline.
- */
- ! void
- ! v_getoutline(int handle, int ch, void **component)
- {
- _intin[0] = ch;
- ! *(void ***)&_intin[1] = component;
- ! __vdi__(VDI_CONTRL_ENCODE(243, 0, 3, 0), handle);
- }
-
- #endif /* L_v_getout */
- --- 105,160 ----
-
- #endif /* L_v_ftext */
-
- ! #ifdef L_v_fteof
- ! void v_ftext_offset(int handle, int x, int y, const char *str, int *offset)
- {
- ! unsigned char ch;
- ! short *ptr = _intin;
- ! int n = 0;
- !
- ! _ptsin[0] = x;
- ! _ptsin[1] = y;
- ! while ( ch = (unsigned const char) *str++)
- ! {
- ! *ptr++ = ch;
- ! n++;
- ! }
- ! *ptr = 0;
- !
- ! ptr = &_ptsin[2];
- ! for(n *= 2; n > 0; n--)
- ! {
- ! *ptr++ = *offset++;
- ! }
- !
- ! __vdi__(VDI_CONTRL_ENCODE(241, 1, (int)(ptr - _intin), 0), handle);
- }
- + #endif /* L_v_fteof */
- +
- + #ifdef L_v_killou
- +
- + #error v_killoutline(int handle, void *component) doesnt exist any more
- +
- #endif /* L_v_killou */
-
-
- #ifdef L_v_getout
- !
- ! /* Generate an outline for character ch, and return the bezier representation
- ! * in the buffer provided.
- */
- ! void v_getoutline(int handle, int ch, int *xyarray, char *bezarray,
- ! int maxverts, int *numverts)
- {
- + int **addr;
- +
- _intin[0] = ch;
- ! _intin[1] = maxverts;
- ! addr = (int **)(&_intin[2]);
- ! *addr++ = xyarray;
- ! *addr = (int *)bezarray;
- ! __vdi__(VDI_CONTRL_ENCODE(243, 0, 6, 0), handle);
- ! *numverts = _intout[0];
- }
-
- #endif /* L_v_getout */
- ***************
- *** 174,188 ****
-
-
- #ifdef L_vst_scra
- ! /* ---------------------------------------------------------------------------
- ! * Set scratch buffer allocation mode.
- * This buffes is used when creating special effects on fonts.
- * mode=0: (default) account for FSM fonts when allocating scratch buffers
- * mode=1: account only for BM fonts; no special effects for outlines
- * mode=2: allocate no scratch buffer; no special effects at all
- */
- ! void
- ! vst_scratch(int handle, int mode)
- {
- _intin[0] = mode;
- __vdi__(VDI_CONTRL_ENCODE(244, 0, 1, 0), handle);
- --- 161,174 ----
-
-
- #ifdef L_vst_scra
- !
- ! /* Set scratch buffer allocation mode.
- * This buffes is used when creating special effects on fonts.
- * mode=0: (default) account for FSM fonts when allocating scratch buffers
- * mode=1: account only for BM fonts; no special effects for outlines
- * mode=2: allocate no scratch buffer; no special effects at all
- */
- ! void vst_scratch(int handle, int mode)
- {
- _intin[0] = mode;
- __vdi__(VDI_CONTRL_ENCODE(244, 0, 1, 0), handle);
- ***************
- *** 193,209 ****
-
- #ifdef L_vst_erro
-
- ! /* ---------------------------------------------------------------------------
- ! * Set FSM error mode.
- * mode=1: (default) errors go to screen.
- * mode=0: errors reported in error variable `errorvar'.
- */
- ! void
- ! vst_error(int handle, int mode, int *errorvar)
- {
- _intin[0] = mode;
- ! *(int **)&_intin[1] = errorvar;
- __vdi__(VDI_CONTRL_ENCODE(245, 0, 3, 0), handle);
- }
-
- #endif /* L_vst_erro */
- --- 179,196 ----
-
- #ifdef L_vst_erro
-
- ! /* Set FSM error mode.
- * mode=1: (default) errors go to screen.
- * mode=0: errors reported in error variable `errorvar'.
- */
- ! void vst_error(int handle, int mode, int *errorvar)
- {
- + short errv;
- +
- _intin[0] = mode;
- ! *(short **)&_intin[1] = &errv;
- __vdi__(VDI_CONTRL_ENCODE(245, 0, 3, 0), handle);
- + *errorvar = errv;
- }
-
- #endif /* L_vst_erro */
- ***************
- *** 211,224 ****
-
- #ifdef L_v_shtext
-
- ! /* ----------------------------------------------------------------------
- ! * v_gtext with shadow.
- * Text color should be set to `color' before calling.
- * This is not technically an FSM binding,
- * but this module is a convenient place for it.
- */
- ! void
- ! v_shtext( int wsid,
- int x,
- int y,
- const char * text,
- --- 198,209 ----
-
- #ifdef L_v_shtext
-
- ! /* v_gtext with shadow.
- * Text color should be set to `color' before calling.
- * This is not technically an FSM binding,
- * but this module is a convenient place for it.
- */
- ! void v_shtext( int wsid,
- int x,
- int y,
- const char * text,
- ***************
- *** 243,256 ****
-
- #ifdef L_vst_arbp
-
- ! /* ----------------------------------------------------------------------
- ! * Set character cell height to arbitrary value.
- * Height is given in printer points (more or less) and it does not
- * have to be listed in extend.sys.
- * Only for FSM outline fonts.
- */
- ! int
- ! vst_arbpt( int handle,
- int point,
- int *wchar,
- int *hchar,
- --- 228,239 ----
-
- #ifdef L_vst_arbp
-
- ! /* Set character cell height to arbitrary value.
- * Height is given in printer points (more or less) and it does not
- * have to be listed in extend.sys.
- * Only for FSM outline fonts.
- */
- ! int vst_arbpt( int handle,
- int point,
- int *wchar,
- int *hchar,
- ***************
- *** 270,283 ****
- }
- #endif /* L_vst_arbp */
-
- #ifdef L_vqt_adva
-
- ! /* ----------------------------------------------------------------------
- ! * Inquire FSM text advance placement vector.
- ! * Remainders xrem and yrem are modulo 16384 (2^14, 1 << 14)
- */
- ! void
- ! vqt_advance( int handle, int ch, int *xadv, int *yadv, int *xrem, int *yrem)
- {
- short *outp = &_ptsout[0];
-
- --- 253,297 ----
- }
- #endif /* L_vst_arbp */
-
- + #ifdef L_vst_ar32
- +
- + /* fix32 version */
- + long vst_arbpt32( int handle,
- + long point,
- + int *wchar,
- + int *hchar,
- + int *wcell,
- + int *hcell )
- + {
- + short *outp = &_ptsout[0];
- +
- + *((long *)(&_intin[0])) = point;
- + __vdi__(VDI_CONTRL_ENCODE(246, 0, 2, 0), handle);
- + *wchar = *outp++;
- + *hchar = *outp++;
- + *wcell = *outp++;
- + *hcell = *outp;
- +
- + return *((long *)(&_intout[0]));
- + }
- + #endif /* L_vst_ar32 */
- +
- #ifdef L_vqt_adva
-
- ! /* Inquire Outline Font Text Advance Placement Vector
- ! * This function returns the x and y offsets which are needed to place the
- ! * next character of a string in the proper position. This call is necessary
- ! * when laying down text at rotations other than 0, 90, and 270. In addition,
- ! * the call returns remainder values for the x and y offsets (mod 16000), so
- ! * that cursor placement can be calculated for v_ftext() and vqt_f_extent().
- ! *
- ! * In addition, this call also returns values in units of 1/65536 pixels (fix31
- ! * format). The new binding for vqt_advance32() follows, and atari encourages
- ! * programmers to use the new data type.
- ! *
- */
- ! void vqt_advance(int handle, int ch, int *xadv, int *yadv, int *xrem,
- ! int *yrem)
- {
- short *outp = &_ptsout[0];
-
- ***************
- *** 290,306 ****
- }
- #endif /* L_vqt_adva */
-
- #ifdef L_vqt_devi
-
- ! /* ----------------------------------------------------------------------
- ! * Inquire device status information.
- ! *
- ! * Watch out! Name is returned as a COUNTED string in 8+3 format,
- ! * without separator, all in an upper case. Missing character
- ! * positions are filled with blanks.
- ! * (At least this was the case for some versions of FSMGDOS.
- ! * Who knows what will happen next. This is NOT documented.
- ! * Check before you jump!)
- */
- void
- vqt_devinfo( int handle, int device, int *isdev, char *drivername )
- --- 304,330 ----
- }
- #endif /* L_vqt_adva */
-
- + #ifdef L_vqt_ad32
- + /* new binding. returns results in fix31 (1/64k pixels) types.
- + */
- + void vqt_advance32(int handle, int ch, long *advx, long *advy)
- + {
- + long *outp = (long *)(&_ptsout[4]);
- +
- + _intin[0] = ch;
- + __vdi__(VDI_CONTRL_ENCODE(247, 0, 1, 0), handle);
- + *advx = *outp++;
- + *advy = *outp;
- + }
- + #endif /* L_vqt_ad32 */
- +
- #ifdef L_vqt_devi
-
- ! /* Inquire device status information.
- ! * This function takes a device id number as a parameter and reports back to
- ! * the application whether or not the driver for that device has been installed
- ! * by gdos. If the driver has been installed, the name of the driver is
- ! * returned to the application.
- */
- void
- vqt_devinfo( int handle, int device, int *isdev, char *drivername )
- ***************
- *** 322,329 ****
-
- #ifdef L_v_saveca
-
- ! /* ----------------------------------------------------------------------
- ! * Save FSM cache to disk.
- */
- int
- v_savecache( int handle, char *filename )
- --- 346,352 ----
-
- #ifdef L_v_saveca
-
- ! /* Save outline font cache to disk.
- */
- int
- v_savecache( int handle, char *filename )
- ***************
- *** 340,347 ****
-
- #ifdef L_v_loadca
-
- ! /* ----------------------------------------------------------------------
- ! * Load/merge FSM cache from disk.
- */
- int
- v_loadcache( int handle, char *filename, int mode )
- --- 363,372 ----
-
- #ifdef L_v_loadca
-
- ! /* Load/merge outline font cache from disk.
- ! * mode = 0 - append
- ! * = 1 - flush and load anew
- ! * returns 0 or -1 if error
- */
- int
- v_loadcache( int handle, char *filename, int mode )
- ***************
- *** 359,369 ****
-
- #ifdef L_v_flushc
-
- ! /* ----------------------------------------------------------------------
- ! * Flush FSM cache.
- */
- ! int
- ! v_flushcache( int handle )
- {
- __vdi__(VDI_CONTRL_ENCODE(251, 0, 0, 0), handle);
-
- --- 384,393 ----
-
- #ifdef L_v_flushc
-
- ! /* Flush outline font cache.
- ! * return 0 or -1 on error.
- */
- ! int v_flushcache( int handle )
- {
- __vdi__(VDI_CONTRL_ENCODE(251, 0, 0, 0), handle);
-
- ***************
- *** 373,386 ****
-
- #ifdef L_vst_sets
-
- ! /* ----------------------------------------------------------------------
- ! * Set character cell width (set size) to arbitrary value.
- ! * Width is given in printer points (more or less).
- ! * Only for FSM outline fonts.
- ! * Effects are cancelled by calls to vst_point, vst_arbpt or vst_height.
- */
- ! int
- ! vst_setsize( int handle,
- int point,
- int *wchar,
- int *hchar,
- --- 397,412 ----
-
- #ifdef L_vst_sets
-
- ! /* Set Character Cell Width by Arbitrary Points. This function sets the current
- ! * graphic text character width (set size) in printer points. An arbitrary set
- ! * size may be entered to represent the character width. It should be noted
- ! * that the next call to vst_point, vst_arbpt or vst_height will cancel out
- ! * this call and will set the set size to be equal to the requested point
- ! * size. This call will only work with outline fonts. The set size may be
- ! * specified in either 16-bit integer format or 32-bit fix31 format (units of
- ! * 1/65536 points).
- */
- ! int vst_setsize( int handle,
- int point,
- int *wchar,
- int *hchar,
- ***************
- *** 401,414 ****
- }
- #endif /* L_vst_sets */
-
- #ifdef L_vst_skew
-
- ! /* ----------------------------------------------------------------------
- ! * Set FSM skew.
- ! * Skew in tenths of degrees. Valid values between -900 and 900.
- */
- ! int
- ! vst_skew( int handle, int skew )
- {
- _intin[0] = skew;
- __vdi__(VDI_CONTRL_ENCODE(253, 0, 1, 0), handle);
- --- 427,464 ----
- }
- #endif /* L_vst_sets */
-
- + #ifdef L_vst_se32
- +
- + /* new fix31 version
- + */
- +
- + long vst_setsize32( int handle,
- + long point,
- + int *wchar,
- + int *hchar,
- + int *wcell,
- + int *hcell )
- + {
- + short *outp = &_ptsout[0];
- +
- + *((long *)(&_intin[0])) = point;
- + __vdi__(VDI_CONTRL_ENCODE(252, 0, 2, 0), handle);
- +
- + *wchar = *outp++;
- + *hchar = *outp++;
- + *wcell = *outp++;
- + *hcell = *outp;
- +
- + return *((long *)(&_intout[0]));
- + }
- + #endif /* L_vst_se32 */
- +
- #ifdef L_vst_skew
-
- ! /* Set FSM skew. (only works with outline fonts)
- ! * Skew in tenths of degrees. Valid values between -900 and 900. (-ve to left)
- */
- ! int vst_skew( int handle, int skew )
- {
- _intin[0] = skew;
- __vdi__(VDI_CONTRL_ENCODE(253, 0, 1, 0), handle);
- ***************
- *** 419,424 ****
- --- 469,499 ----
-
- #ifdef L_vqt_get_
-
- + /* Get Character Mapping Table. This call returns the address of a series of
- + * contiguous tables used internally by SpeedoGDOS. The tables are used to
- + * map the Atari character set to the equivalent Bitstream character indexes.
- + * Depending on the font file, a Speedo font's indexes have six different
- + * formats: the Bitstream International Character Set, the Bitstream
- + * International Symbol Set, the Bitstream Dingbats Set, the PostScript text
- + * set, the PostScript symbol set, and the PostScript Dingbats set. There are
- + * a total of seven tables which map the Atari character set to Bitstream
- + * character indexes, one master mapping, and one table for each of the
- + * aforementioned character sets (in the order presented). Applications can
- + * find out which character set corresponds to the current font by checking the
- + * Speedo font file header. Each individual table contains 224 word-sized
- + * entries with the first entry being the translation for character 32, the
- + * second for character 33....etc. Therefore, with the address of the table,
- + * applications can change the mappings so that any Bitstream character index
- + * may be substituted.
- + */
- + void vqt_get_table(int handle, short **map)
- + {
- + __vdi__(VDI_CONTRL_ENCODE(254, 0, 0, 0), handle);
- +
- + *map = *((short **)(&_intout[0]));
- + }
- +
- + #if 0 /* old fsm binding */
- /* ----------------------------------------------------------------------
- * Get FSM GASCII tables.
- */
- ***************
- *** 429,448 ****
- *gascii = *(void **)&_intout[0];
- *style = *(void **)&_intout[2];
- }
- #endif /* L_vqt_get_ */
-
- #ifdef L_vqt_cach
-
- ! /* ----------------------------------------------------------------------
- ! * Get FSM cashe size
- */
- ! void
- ! vqt_cachesize( int handle, int which_cache, size_t *size )
- {
- _intin[0] = which_cache;
- __vdi__(VDI_CONTRL_ENCODE(255, 0, 1, 0), handle);
- ! *size = *(size_t *)&_intout[0];
- }
- #endif /* L_vqt_cach */
-
- /* -eof- */
- --- 504,649 ----
- *gascii = *(void **)&_intout[0];
- *style = *(void **)&_intout[2];
- }
- + #endif
- #endif /* L_vqt_get_ */
-
- #ifdef L_vqt_cach
-
- ! /* Get Outline Font Cache Size. Returns the largest block size available in
- ! * each of the two fsm caches. This call can be used to estimate how big a
- ! * character SpeedoGDOS can handle when it prints a character. A zero (0) in
- ! * which_cache will instruct SpeedoGDOS to return the largest allocatable block
- ! * in the character bitmap cache. A one (1) will return the same information
- ! * for the data structure cache.
- */
- ! void vqt_cachesize( int handle, int which_cache, size_t *size )
- {
- _intin[0] = which_cache;
- __vdi__(VDI_CONTRL_ENCODE(255, 0, 1, 0), handle);
- ! *size = *((size_t *)(&_intout[0]));
- }
- #endif /* L_vqt_cach */
- +
- +
- + #ifdef L_vst_char
- +
- + /* Set Character Mapping Mode. This function allows the application to switch
- + * from using the Atari character set to the BICS character set. The
- + * vst_charmap() function will set a flag so that all subsequent calls to text
- + * calls will use words that are equivalent to Bitstream character indexes
- + * instead of Atari ASCII bytes.
- + */
- + void vst_charmap(int handle, int mode)
- + {
- + _intin[0] = mode;
- + __vdi__(VDI_CONTRL_ENCODE(236, 0, 1, 0), handle);
- + }
- + #endif /* L_vst_char */
- +
- + #ifdef L_vst_kern
- +
- + /* Set Kerning Mode. This function allows the application to set the different
- + * kerning modes. Track kerning can have 0-3 tracks: 0 is no kerning, 1 is
- + * normal, 2 is tight, and 3 is very tight. The vst_kern() function passes in
- + * a track kern value and it returns the track to which the current font is
- + * set. Pair kerning is set to be on or off. The vst_kern() function will
- + * return 0 if there is no track kerning or a number greater than 0 to indicate
- + * that pair kerning is on; that number is the number of kerning pairs in the
- + * font.
- + */
- + void vst_kern(int handle, int tmode, int pmode, int *tracks, int *pairs)
- + {
- + _intin[0] = tmode;
- + _intin[1] = pmode;
- + __vdi__(VDI_CONTRL_ENCODE(237, 0, 2, 0), handle);
- + *tracks = _intout[0];
- + *pairs = _intout[1];
- + }
- + #endif /* L_vst_kern */
- +
- + #ifdef L_vqt_fnt
- +
- + /* Inquire Speedo Font Header Information. This function copies the current
- + * font's Speedo font header into a buffer and returns the full path name for
- + * the corresponding TDF file. Note that the buffer must be at least 421
- + * bytes. See (nonexistant!) Bitstream documentation for specific font header
- + * information.
- + */
- + void vqt_fontheader(int handle, char *buffer, char *pathname)
- + {
- + short *ptr;
- + int n;
- +
- + *((char **)(&_intin[0])) = buffer;
- + __vdi__(VDI_CONTRL_ENCODE(232, 0, 2, 0), handle);
- +
- + for(ptr = &_intout[0], n = _contrl[4]; n > 0; n--)
- + *pathname++ = *ptr++;
- + }
- + #endif /* L_vqt_fnt */
- +
- + #ifdef L_vqt_trac
- +
- + /* Inquire Track Kerning Information. This function allows the application to
- + * inquire the adjustment vector for track kerning. The vqt_trackkern()
- + * function returns the vector (x-direction and y-direction) that indicates
- + * the spacing adjustment made between characters.
- + */
- + void vqt_trackkern(int handle, long *x, long *y)
- + {
- + __vdi__(VDI_CONTRL_ENCODE(234, 0, 0, 0), handle);
- + *x = *((long *)(&_ptsout[0]));
- + *y = *((long *)(&_ptsout[2]));
- + }
- + #endif /* L_vqt_trac */
- +
- + #ifdef L_vqt_pair
- +
- + /* Inquire Pair Kerning Information. This function allows the application to
- + * inquire the adjustment vector for pair kerning. The vqt_pairkern() function
- + * returns the vector (x-direction and y-direction) that indicates the spacing
- + * adjustment made between the character pair specified.
- + */
- + void vqt_pairkern(int handle, int ch1, int ch2, long *x, long *y)
- + {
- + _intin[0] = ch1;
- + _intin[1] = ch2;
- + /* atari doc is wrong about contrl[3] */
- + __vdi__(VDI_CONTRL_ENCODE(235, 0, 2, 0), handle);
- + *x = *((long *)(&_ptsout[0]));
- + *y = *((long *)(&_ptsout[2]));
- + }
- + #endif /* L_vqt_pair */
- +
- + #ifdef L_v_getbit
- +
- + /* Get Character Bitmap Information. This call provides information to allow
- + * the caller to know the exact size and placement of a given character. This
- + * information includes the character's x and y advance vectors, the x and y
- + * offsets, and the bitmap dimensions of the character. The advance vector
- + * represents the amount to add to the current point to place the following
- + * character. The x and y offsets, when added to the current point, give the
- + * caller the location of the upper left hand corner of the bitmap. The width
- + * and height of the bitmap are returned as 16 bit integers. All other values
- + * are returned in fix31 representation.
- + */
- + void v_getbitmap_info(int handle,
- + int ch,
- + long *advancex, long *advancey,
- + long *xoffset, long *yoffset,
- + int *width, int *height,
- + short **bitmap)
- + {
- + _intin[0] = ch;
- + __vdi__(VDI_CONTRL_ENCODE(239, 0, 1, 0), handle);
- + *width = _intout[0];
- + *height = _intout[1];
- + *advancex = *((long *)(&_intout[2]));
- + *advancey = *((long *)(&_intout[4]));
- + *xoffset = *((long *)(&_intout[6]));
- + *yoffset = *((long *)(&_intout[8]));
- + *bitmap = *((short **)(&_intout[10]));
- + }
- + #endif /* L_v_getbit */
-
- /* -eof- */
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/gemlib/vdiinq.c,v
- retrieving revision 1.9
- diff -c -r1.9 vdiinq.c
- *** 1.9 1992/01/29 19:04:38
- --- vdiinq.c 1993/02/22 06:07:50
- ***************
- *** 25,31 ****
- --- 25,41 ----
- * your program was allocating this extra byte anyway for a
- * terminating null, but it may kill you if this space was tight!
- * THIS IS NOT OFFICIAL yet and it may change!!!
- + *
- + *******
- + *
- + * This is official now (jan 93 SpeedoGDOS docs from atari).
- + * To quote the doc "A new parameter has been added to this function.
- + * It is a flag that indicates whether or not the font in question is
- + * an outline font or bitmap font. The flag will be contained in
- + * intin[33]; 0 will signify a bitmap font, and 1 will indicate an
- + * outline font."
- */
- +
- #include "common.h"
-
- #ifdef __DEF_ALL__
-